<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "{{%config}}".
 *
 * @property int $id
 * @property int $type_id
 * @property string $name
 * @property string $format
 * @property string $value
 * @property string $label
 * @property string $input_type
 * @property string $setting
 * @property string $description
 * @property string $site_id
 */
class Config extends \common\db\ActiveRecord {

    /**
     * @inheritdoc
     */
    public static function tableName() {
        return '{{%config}}';
    }

    /**
     * @inheritdoc
     */
    public function rules() {
        return [
            [['type_id', 'site_id'], 'integer'],
            [['name', 'format', 'value', 'label'], 'required'],
            [['value', 'setting'], 'string'],
            [['name', 'format', 'label', 'input_type'], 'string', 'max' => 100],
            [['description'], 'string', 'max' => 255],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels() {
        return [
            'id' => 'ID',
            'type_id' => 'Type ID',
            'name' => 'Name',
            'format' => 'Format',
            'value' => 'Value',
            'label' => 'Label',
            'input_type' => 'Input Type',
            'setting' => 'Setting',
            'description' => 'Description',
            'site_id' => 'Site ID',
        ];
    }

}
